using System;
using System.Collections;
using System.Collections.Specialized;
using org.opencube.oms.meta;

namespace org.opencube.oms {

	public class OmsDataFactory {
		private Hashtable m_omsDatas = new Hashtable();
		private OmsMetaData m_omsMetaData = new OmsMetaData();

		public OmsData GetOmsData( NameValueCollection dbSettings, int userId ) {
			OmsData omsData = (OmsData) this.m_omsDatas[ dbSettings ];
			if ( omsData == null ) {
				omsData = new OmsData( this.m_omsMetaData, dbSettings, userId );
				this.m_omsDatas.Add( dbSettings, omsData );
			}//if
			return omsData;
		}//GetOmsData
		
		public int GetCountOfOmsDatas(){
			return this.m_omsDatas.Count;
		}//GetCountOfOmsDatas

	}//OmsDataFactory
}
